package olap4cloud.api;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

import olap4cloud.data.DataStruct;
import olap4cloud.hbase.TrackingTable;

public class TrackingApi {
	public static void main(String[] args) throws ParseException {
		TrackingTable trackingTable = new TrackingTable();
		SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd:HH-mm");
		long time = simple.parse(args[0]).getTime();
		List<DataStruct> listData = TrackingTable.scanTable(time,
				time + Integer.parseInt(args[1]) * 60 * 1000);
		for (DataStruct dt : listData) {
			System.out.println(dt);
		}
		System.out.println(listData.size());
	}
}
